<p><?= $this->Html->link('&laquo; nazad', '/admin_partners', array('escape'=>false)) ?></p>

<? if((int)@$partner['Partner']['id']): ?>
	<h1>Izmena proizvođača #<?= @$partner['Partner']['id']?></h1>
<? else: ?>
	<h1>Novi proizvođač</h1>
<? endif; ?>
<?= $this->Form->create('Partner', array('url'=>'/admin_partners/save', 'enctype'=>'multipart/form-data')) ?>
	<?= $this->Form->hidden('id', array('value'=>@$partner['Partner']['id'])) ?>
	
	<?= $this->Form->label('name', "Naziv:") ?>
	<?= $this->Form->text('name', array('value'=>@$partner['Partner']['name'], 'class'=>'large')) ?>
	
	<?= $this->Form->label('url', "Sajt:") ?>
	<?= $this->Form->text('url', array('value'=>@$partner['Partner']['url'], 'class'=>'large')) ?>
	
	<?= $this->Form->label('image', "Logo:") ?>
	<?= $this->Form->hidden('image', array('value'=>@$partner['Partner']['image'])) ?>
	<?= $this->Html->image('partners/'. preg_replace('/\.(.*?)$/', '.hover.$1', @$partner['Partner']['image']), array('align'=>'left')) ?>
    <?= $this->Form->file('image_new') ?><br clear="all">
	
    <?= $this->Form->label('description', "Opis:") ?>
    <?= $this->Form->textarea('description', array('value'=>@$partner['Partner']['description'])) ?>
	

	<br clear="all">
	<?= $this->Form->submit('Sačuvaj', array('div'=>false)) ?>
	<?= $this->Form->submit('Poništi', array('onclick'=>"location.href='/admin_partners'", 'type'=>'button', 'div'=>false)) ?>
<?= $this->Form->end();
